function res = fun_finder_plot(theta,phi,t,L,L2 ,M,g)
minratio = .01;
maxratio = .99;
n = 1000;

    ratios=linspace(minratio,maxratio,n);
    L1s=ratios*L;
    Rs=L-L1s;
    mratio = linspace(.7,.9,5);
    
    for j=1:length(mratio)
        M1 = mratio(j)*M;
        M2 = M-M1;
    
    for i=1:n
        range(i)=trebufunV2_rangefinder(theta,phi,t,Rs(i),L1s(i), L2,M1,M2,g);
         
    end
    
    MAP(j,:) = range;
    disp(max(range));
    end
    res=MAP;
    
     pcolor(ratios,mratio,MAP);  
     shading interp
    colorbar

end
%200,280,30,20,4,500,10,9.8